using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Acms.SqlDal;

namespace Acms.Bll
{
    public class PostUploadSummary : Post
    {
        protected PostUploadSummary() : base() { }
        protected PostUploadSummary(Hashtable table) : base(table) { }
        protected PostUploadSummary(Hashtable table, List<PostUploadSummary> collection) : base(table, collection) { }

        public static new PostUploadSummary CreateInstance()
        {
            return new PostUploadSummary();
        }

        protected override Acms.SqlDal.Base CreateDal()
        {
            return new PostUploadSummaryDal();
        }

        public static List<PostUploadSummary> GetAllBySiteId(int siteId)
        {
            PostUploadSummaryDal dal = new PostUploadSummaryDal();
            return Get(dal.GetAllBySiteId(siteId));
        }

        private static List<PostUploadSummary> Get(Hashtable[] tables)
        {
            if (tables == null)
            {
                return null;
            }
            else
            {
                List<PostUploadSummary> tmp = new List<PostUploadSummary>();
                foreach (Hashtable table in tables)
                {
                    tmp.Add(new PostUploadSummary(table, tmp));
                }
                return tmp;
            }
        }

        private static PostUploadSummary Get(Hashtable table)
        {
            if (table == null)
            {
                return null;
            }
            else
            {
                return new PostUploadSummary(table);
            }
        }

        protected override void Load(Hashtable table)
        {
            base.Load(table);
            total = (int)table[PostUploadSummaryDal.Fields.Total];
            reviewed = (int)table[PostUploadSummaryDal.Fields.Reviewed];
            reported = (int)table[PostUploadSummaryDal.Fields.Reported];
            suspended = (int)table[PostUploadSummaryDal.Fields.Suspended];
        }

        private int total;
        public int Total
        {
            get { return total; }
        }

        private int reviewed;
        public int Reviewed
        {
            get { return reviewed; }
        }

        private int reported;
        public int Reported
        {
            get { return reported; }
        }

        private int suspended;
        public int Suspended
        {
            get { return suspended; }
        }
	
	
	
	


    }
}
